require.config({
    baseUrl: '/public/js/manualTimeTable',
    paths: {
        //text: 'text'
    }
});

require(['manualTimeTable'], function(manualTimeTable) {
    var _manualTimeTable = new manualTimeTable({
        container: '#manualTimeTableContainer'
    });
    _manualTimeTable.render({
        wid: '3B571DC02925FDC2E050007F01001565',
        jxbid: '011121312',
        jxbmc: '01-Multimedia computer systems 多媒体电脑系统',
        unitMode: 2, // 节次模式，默认1，2为两节连排，3为三节连排
    });

    _manualTimeTable.renderArranges([{
        jxbid: '011121312',
        jxbmc: '01-Multimedia computer systems 多媒体电脑系统',
        teacherName: '张三',
        classroomName: '101室',
        weekNum: '101010100000000000000000000000',
        weekName: '1-7单周',
        week: '2',
        beginUnit: '1',
        endUnit: '2'
    }, {
        jxbid: '011121312',
        jxbmc: '01-Multimedia computer systems 多媒体电脑系统',
        teacherName: '李四',
        classroomName: '102室',
        weekNum: '010101010000000000000000000000',
        weekName: '2-8双周',
        week: '2',
        beginUnit: '1',
        endUnit: '2'
    }, {
        jxbid: '011121312',
        jxbmc: '01-Multimedia computer systems 多媒体电脑系统',
        teacherName: '李四',
        classroomName: '102室',
        weekNum: '001111110000000000000000000000',
        weekName: '3-8',
        week: '4',
        beginUnit: '5',
        endUnit: '6'
    }]);

    // ---------------------------------------------------------------------------

    $('#setWeekNumName').click(function() {
        _manualTimeTable.setWeekNumName({
            weekNum: '001111110000000000000000000000',
            weekName: '3-8'
        })

        _manualTimeTable.renderObstacles([{
            weekNum: '101010100000000000000000000000',
            weekName: '1-7单周',
            week: '1',
            description: '**周**班已屏蔽该时间片',
            beginUnit: '5',
            endUnit: '6'
        }]);
    });

    $('#removeSelected').click(function() {
        _manualTimeTable.removeSeletedArranges();
    });

})
